package com.hxminer.hxwebs.dao;

import com.hxminer.hxwebs.model.OrderDetails;
import com.hxminer.hxwebs.model.Product;
import org.springframework.data.repository.PagingAndSortingRepository;
import org.springframework.stereotype.Repository;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Author YRG
 * Created by on 2018/5/17.
 * Describe
 */
@Transactional
@Repository
public interface OrderDetailDao extends PagingAndSortingRepository<OrderDetails, String> {

    /**
     * 通过 userId、username、orderNo 查询当前提交订单相对应的用户订单详情
     *
     * @param userId
     * @param username
     * @param orderNo
     * @return
     */
    List<OrderDetails> findByUserIdAndUsernameAndOrderNo(String userId, String username, String orderNo);
}
